package org.example.annotation;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.PropertyResourceBundle;
//1111
public class App {
    private static void a(){
       ApplicationContext context = new AnnotationConfigApplicationContext("org.example.annotation");
        DemoA a = context.getBean("demoA", DemoA.class);
        a.a();
    }

    private static void b(){
        //加载扫描
        ApplicationContext context = new AnnotationConfigApplicationContext("org.example.annotation");
        DemoB b = context.getBean("db", DemoB.class);
        System.out.println(b);

    }

    private static void c(){
        //加载扫描
        ApplicationContext context = new AnnotationConfigApplicationContext("org.example.annotation");
        DemoC b = context.getBean("dc", DemoC.class);
        System.out.println(b);

    }
    private static void d(){
        //加载扫描
        ApplicationContext context = new AnnotationConfigApplicationContext("org.example.annotation");
        DemoD b = context.getBean("demoD", DemoD.class);
        System.out.println(b);

    }

    private static void e(){
        //加载扫描
        ApplicationContext context = new AnnotationConfigApplicationContext("org.example.annotation");
        DemoF f = context.getBean( DemoF.class);
        f.f();

    }


    public static void main(String[] args) {
        e();
    }
}
